import request from "@/utils/request";
// 新增考生用户信息
export function addKsUser(data) {
  return request({
    url: "/whpx/ksUser",
    method: "post",
    data: data
  });
}
//获取个人信息
export function getksUsernews(id) {
  return request({
    url: "/whpx/ksUser/" + id,
    method: "get",
    isToken: false
  });
}
// 查询课程中心列表
export function listCourse(query) {
  return request({
    url: "/whpx/course/getUserCourselist",
    headers: {
      isToken: false
    },
    method: "get",
    params: query
  });
}
// 查询课程中心详细
export function getCourse(query) {
  return request({
    url: "/whpx/course/getDetailByUser",
    headers: {
      isToken: false
    },
    params: query,
    method: "get"
  });
}
// 获取试题列表
export function getExamTemp(query) {
  return request({
    url: "/whpx/ksExam/getExamTemplateByKm",
    headers: {
      isToken: false
    },
    params: query,
    method: "get"
  });
}
//获取考生详情
export function studentDetail(id) {
  return request({
    url: "/examApp/examDetai/" + id,
    method: "get",
    isToken: false
  });
}
//获取试题
export function getExamList(query) {
  return request({
    url: "/whpx/ksExam/questionList",
    method: "get",
    params: query,
    isToken: false
  });
}
//提交答案
export function SubmitAnswers(data) {
  return request({
    url: "/whpx/ksExam/submitExam",
    method: "post",
    data: data,
    isToken: false
  });
}
//考卷管理详情
export function getkaojuanDetail(data) {
  return request({
    url: "/whpx/ksExam/detail/" + data,
    method: "get",
    isToken: false
  });
}
//修改密码
export function updateUserPwd(data) {
  return request({
    url: "/whpx/ksUser",
    method: "put",
    data: data
  });
}
//课时记录
export function courseHourRecord(data) {
  return request({
    url: "/whpx/courseHourRecord",
    method: "post",
    data: data
  });
}
//判断该学员是否具备考试资格
export function getUserCourseStatus(data) {
  return request({
    url: "/whpx/course/getUserCourseStatus",
    method: "get",
    params: data
  });
}
// export function getExamTemp(query) {
//   return request({
//     url: "/whpx/ksExam/getExamTemplateByKm",
//     headers: {
//       isToken: false
//     },
//     params: query,
//     method: "get"
//   });
// }
